package com.chiry.shop.goods.controller;

import com.chiry.common.vo.Result;
import com.chiry.common.bo.goods.GoodsBO;
import com.chiry.shop.goods.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fyx
 * @version 1.0
 * @date 2021/12/9 19:40
 */
@RestController
@RequestMapping("goods")
public class GoodsController {
    @Autowired
    GoodsService goodsService;
    @RequestMapping("findGoods/{id}")
    public Result<GoodsBO> findGoodsById(@PathVariable("id") Long id){
        return goodsService.findGoodsById(id);
    }
}
